<?php
class Atur_pengguna extends CI_Model 
{

	function __construct()
	{
		parent::__construct();
	}
	
	function read()
	{
		$this->db->select('id_a_pengguna, nama_lengkap, username, role');
		$this->db->from('a_pengguna');
		$this->db->join('m_pegawai', 'm_pegawai.id_m_pegawai = a_pengguna.id_m_pegawai');
		$this->db->order_by('role');

		$query = $this->db->get();		
		return $query->result();
	}
}